<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" th:href="@{/css/icon-font.css}">
    <link rel="stylesheet" th:href="@{/lay/lib/layui-v2.5.5/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/lay/css/public.css}" media="all">
    <link rel="stylesheet" type="text/css" th:href="@{/lay/dist/notice.css}">

    <style>
        .layui-form-select {
            cursor: pointer;

        }
    </style>


</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <fieldset class="table-search-fieldset">
            <legend>搜索信息</legend>
            <div style="margin: 10px 10px 10px 10px">
                <form class="layui-form layui-form-pane" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">轮播状态</label>
                            <div id="message" class="layui-input-inline">
                                <select name="start">
                                    <option value="">全部</option>
                                    <option value="1">使用中</option>
                                    <option value="2">未使用</option>
                                </select>
                            </div>
                        </div>


                        <div class="layui-inline">
                            <label class="layui-form-label">页面类型</label>
                            <div class="layui-input-inline">
                                <select name="indexTypeId">
                                    <option value="">全部</option>
                                    <option th:each="item : ${types}" th:value="${item.id}" th:text="${item.name}"></option>
                                </select>
                            </div>
                        </div>

                        <div class="layui-inline">
                            <button type="submit" class="layui-btn layui-btn-primary"  lay-submit lay-filter="data-search-btn"><i class="layui-icon"></i> 搜 索</button>
                        </div>
                    </div>
                </form>
            </div>
        </fieldset>

        <script type="text/html" id="toolbarDemo">
            <div class="layui-btn-container">
                <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="selectAll">查询全部</button>
                <button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="addInfo">添加轮播</button>
            </div>
        </script>

        <table  class="layui-hide" id="checkClass" lay-filter="currentTableFilter"></table>

            <script type="text/html" id="currentTableBar">
            <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>
            <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>
        </script>

        <script type="text/html" id="switchTpl">
            <input type="checkbox" name="start" value={{d.LAY_INDEX}} lay-skin="switch" lay-text="使用中|未使用" lay-filter="start" {{ d.start == 1 ? 'checked' : '' }}>
        </script>
    </div>
</div>
<!--添加类型-->
<div class="layui-inline" id="addType" style="display: none;margin: 20px auto">
    <label class="layui-form-label">页面名称</label>
    <div class="layui-input-inline" style="margin-bottom: 10px;width: 318px">
        <input type="text" name="name" id="addTypeInput" lay-verify="required" autocomplete="off" class="layui-input">
    <button type="button" class="layui-btn layui-btn-normal" id="addTypeBtn">保存</button>
    </div>
</div>
<!--添加编辑-->
<div class="layui-upload layui-form" lay-filter="form" style="width: 510px;display:none; margin: 10px auto" id="addContainer">
    <div style="margin-bottom: 10px;">
        <div class="layui-inline">
            <label class="layui-form-label">轮播标题</label>
            <div class="layui-input-inline" style="margin-bottom: 10px;width: 318px">
                <input type="text" name="title" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">轮播描述</label>
            <div class="layui-input-inline">
                <textarea type="tel" style="width: 320px;height: 60px" name="imageDesc" lay-verify="url" autocomplete="off"
                          class="layui-input"></textarea>
            </div>
        </div>

    </div>
    <div style="margin-bottom: 10px;">
        <div class="layui-inline">
            <label class="layui-form-label">跳转页面</label>
            <div class="layui-input-inline">
                <input type="tel" name="href" lay-verify="url" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-input-inline" style="    margin-left: 10px;">
            <input type="checkbox" value="1" name="start" lay-text="使用|停用" lay-skin="switch" lay-filter="enabled">
        </div>

    </div>
    <div>
        <div class="layui-inline">
            <label class="layui-form-label">首页的类型</label>
            <div class="layui-input-inline">
                <select name="indexTypeId" id="indexTypeId" lay-filter="addType">
                    <option th:each="item : ${types}" th:value="${item.id}" th:text="${item.name}"></option>
                    <option value="-1">添加类型</option>
                </select>
            </div>
        </div>
        <button type="button" class="layui-btn layui-btn-normal" id="selectImg">选择图片</button>
        <button type="button" class="layui-btn layui-btn-normal" id="submit">保存</button>
        <div class="layui-upload-list container_img" id="carousel_img_container" style=" border: 1px solid black;    margin: 10px auto;text-align: center;
          height: 163px;  width: 300px;">
            <img class="layui-upload-img _img"  style="width: 100%;height: 100%" id="carousel_img">
        </div>
    </div>
</div>

<script th:src="@{/lay/lib/jquery-3.4.1/jquery-3.4.1.min.js}"></script>
<script th:src="@{/lay/lib/layui-v2.5.5/layui.js}" charset="utf-8"></script>
<script th:src="@{/js/learn/converterDate.js}"></script>
<script src="/js/learn/tool/addContainer.js"></script>
<script th:src="@{/js/system/index_image/index.js}"></script>
<script th:src="@{/lay/dist/notice.js}"></script>
<script src="/js/learn/tool/toggle.js"></script>
<script>

</script>

</body>
</html>